package com.telit.firecommand.util;

import com.telit.common.constant.Constant;

import java.util.HashMap;
import java.util.Map;


/**
 * 海康工具类
 *
 * @author yuezhuang
 * @date 2022-08-30
 */
public class HaikangUtils {

    //获取监控点预览取流URL
    public static final String PREVIEW_URL = "/artemis/api/video/v2/cameras/previewURLs";
    //分页获取监控点资源
    public static final String URL_DEVICE = "/artemis/api/resource/v1/cameras";
    //设置预置点信息
    public static final String SET_PRESETS = "/artemis/api/video/v1/presets/addition";
    //删除预置点信息
    public static final String DEL_PRESETS = "/artemis/api/video/v1/presets/deletion";
    //查询预置点信息
    public static final String SEARCH_PRESETS = "/artemis/api/video/v1/presets/searches";
    //根据监控点编号进行云台操作
    public static final String PTZ_CONTROL = "/artemis/api/video/v1/ptzs/controlling";
    //查询巡航路径
    public static final String SEARCH_ROUTES = "/artemis/api/video/v1/cruiseRoutes/search";
    //添加或修改巡航路径
    public static final String UPDATE_ROUTES = "/artemis/api/video/v1/cruiseRoutes/update";
    //删除巡航路径
    public static final String DELETE_ROUTES = "/artemis/api/video/v1/cruiseRoutes/delete";
    //巡航路径控制
    public static final String CONTROL_ROUTES = "/artemis/api/video/v1/cruiseRoutes/controlling";
    //获取历史视频回放
    public static final String PLAY_BACK = "/artemis/api/video/v2/cameras/playbackURLs";
    //火情订阅
    public static final String SUBSCRIBE_EVENT = "/artemis/api/eventService/v1/eventSubscriptionByEventTypes";
    //解除火情订阅
    public static final String UNSUBSCRIBE_EVENT = "/artemis/api/eventService/v1/eventUnSubscriptionByEventTypes";
    //查看火情订阅
    public static final String VIEW_EVENT = "/artemis/api/eventService/v1/eventSubscriptionView";

    //接口调用成功返回码
    public static final String SUCCESS_CODE = "0";

    //请求头 contentType
    public final static String MIME = "application/json";

    public static Map<String, String> getUrl(String path) {
        Map<String, String> map = new HashMap<>(2);
        map.put(Constant.HTTPS + "://", path);
        return map;
    }

}
